Optimal. Leaf size=186 \[ \frac {a \left (a^2 (3-n)-3 b^2 (1+n)\right ) \, _2F_1\left (2,\frac {1+n}{2};\frac {3+n}{2};\sin ^2(c+d x)\right ) \sin ^{1+n}(c+d x)}{4 d (1+n)}+\frac {b \left (3 a^2 (2-n)-b^2 (2+n)\right ) \, _2F_1\left (2,\frac {2+n}{2};\frac {4+n}{2};\sin ^2(c+d x)\right ) \sin ^{2+n}(c+d x)}{4 d (2+n)}+\frac {\sec ^4(c+d x) \sin ^{1+n}(c+d x) \left (a \left (a^2+3 b^2\right )+b \left (3 a^2+b^2\right ) \sin (c+d x)\right )}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.20, antiderivative size = 186, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {2916, 1820,
822, 371} \begin {gather*} \frac {a \left (a^2 (3-n)-3 b^2 (n+1)\right ) \sin ^{n+1}(c+d x) \, _2F_1\left (2,\frac {n+1}{2};\frac {n+3}{2};\sin ^2(c+d x)\right )}{4 d (n+1)}+\frac {b \left (3 a^2 (2-n)-b^2 (n+2)\right ) \sin ^{n+2}(c+d x) \, _2F_1\left (2,\frac {n+2}{2};\frac {n+4}{2};\sin ^2(c+d x)\right )}{4 d (n+2)}+\frac {\sec ^4(c+d x) \sin ^{n+1}(c+d x) \left (b \left (3 a^2+b^2\right ) \sin (c+d x)+a \left (a^2+3 b^2\right )\right )}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 371
Rule 822
Rule 1820
Rule 2916
Rubi steps
\begin {align*} \int \sec ^5(c+d x) \sin ^n(c+d x) (a+b \sin (c+d x))^3 \, dx &=\frac {b^5 \text {Subst}\left (\int \frac {\left (\frac {x}{b}\right )^n (a+x)^3}{\left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\sec ^4(c+d x) \sin ^{1+n}(c+d x) \left (a \left (a^2+3 b^2\right )+b \left (3 a^2+b^2\right ) \sin (c+d x)\right )}{4 d}-\frac {b^3 \text {Subst}\left (\int \frac {\left (\frac {x}{b}\right )^n \left (-a \left (a^2 (3-n)-3 b^2 (1+n)\right )-\left (3 a^2 (2-n)-b^2 (2+n)\right ) x\right )}{\left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 d}\\ &=\frac {\sec ^4(c+d x) \sin ^{1+n}(c+d x) \left (a \left (a^2+3 b^2\right )+b \left (3 a^2+b^2\right ) \sin (c+d x)\right )}{4 d}+\frac {\left (a b^3 \left (a^2 (3-n)-3 b^2 (1+n)\right )\right ) \text {Subst}\left (\int \frac {\left (\frac {x}{b}\right )^n}{\left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 d}+\frac {\left (b^4 \left (3 a^2 (2-n)-b^2 (2+n)\right )\right ) \text {Subst}\left (\int \frac {\left (\frac {x}{b}\right )^{1+n}}{\left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 d}\\ &=\frac {a \left (a^2 (3-n)-3 b^2 (1+n)\right ) \, _2F_1\left (2,\frac {1+n}{2};\frac {3+n}{2};\sin ^2(c+d x)\right ) \sin ^{1+n}(c+d x)}{4 d (1+n)}+\frac {b \left (3 a^2 (2-n)-b^2 (2+n)\right ) \, _2F_1\left (2,\frac {2+n}{2};\frac {4+n}{2};\sin ^2(c+d x)\right ) \sin ^{2+n}(c+d x)}{4 d (2+n)}+\frac {\sec ^4(c+d x) \sin ^{1+n}(c+d x) \left (a \left (a^2+3 b^2\right )+b \left (3 a^2+b^2\right ) \sin (c+d x)\right )}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.11, size = 158, normalized size = 0.85 \begin {gather*} \frac {\left (6 a (a-b) (a+b) \, _2F_1\left (1,\frac {1+n}{2};\frac {3+n}{2};\sin ^2(c+d x)\right )+3 (a-b)^2 (a+b) \, _2F_1(2,1+n;2+n;-\sin (c+d x))+3 (a-b) (a+b)^2 \, _2F_1(2,1+n;2+n;\sin (c+d x))+2 (a-b)^3 \, _2F_1(3,1+n;2+n;-\sin (c+d x))+2 (a+b)^3 \, _2F_1(3,1+n;2+n;\sin (c+d x))\right ) \sin ^{1+n}(c+d x)}{16 d (1+n)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.68, size = 0, normalized size = 0.00 \[\int \left (\sec ^{5}\left (d x +c \right )\right ) \left (\sin ^{n}\left (d x +c \right )\right ) \left (a +b \sin \left (d x +c \right )\right )^{3}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\sin \left (c+d\,x\right )}^n\,{\left (a+b\,\sin \left (c+d\,x\right )\right )}^3}{{\cos \left (c+d\,x\right )}^5} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________